// 静态方法
var StaticFunc = function () { }

StaticFunc.prototype.destroy = function (obj) {
    if (obj != null && obj != undefined) {
        if (obj instanceof cc.Node) {
            obj.destroy();
        }
        obj = null;
    }
},

StaticFunc.prototype.getIntersectionBetweenTwoNodeOnTheWorld = function(node1, node2) {
    return this.getIntersectionBetweenTwoRect(node1.getBoundingBoxToWorld(),node2.getBoundingBoxToWorld())

},
StaticFunc.prototype.getIntersectionBetweenNodeRect = function(node, rect) {
    return this.getIntersectionBetweenTwoRect(node.getBoundingBoxToWorld(),rect)
},
StaticFunc.prototype.getIntersectionBetweenTwoRect= function(rect1, rect2) {
    var intersectionRect = new cc.Rect();
    return rect1.intersection(intersectionRect, rect2);
},

    module.exports = StaticFunc; 